﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Windows.Forms;
using System.ComponentModel;

namespace DoxyOutParser
{
	class TextPadLauncher
	{
        TextPadLauncher()
        {
        }

		public static void Launch (string doxyFileName,string line)
		{
			ProcessStartInfo startInfo = new ProcessStartInfo();
			startInfo.FileName = "C:\\Program Files\\TextPad 4\\TextPad.exe";
			startInfo.WindowStyle = ProcessWindowStyle.Hidden;
			startInfo.Arguments = doxyFileName +"("+line+")";
            try
            {
                Process.Start(startInfo);
            }
            catch (Win32Exception exception)
            {
                throw new Win32Exception(exception.Message + ": " + startInfo.FileName);
            }                
		}
	}

    class NotepadPPLauncher
    {
        NotepadPPLauncher()
        {
        }

        public static void Launch(string doxyFileName, string line)
        {
            ProcessStartInfo startInfo = new ProcessStartInfo();
            startInfo.FileName = "C:\\Program Files\\Notepad++\\Notepad++.exe";
            startInfo.WindowStyle = ProcessWindowStyle.Hidden;
            startInfo.Arguments = doxyFileName + " -n" + line;
            try
            {
                Process.Start(startInfo);
            }
            catch (System.ComponentModel.Win32Exception exception)
            {
                throw new Win32Exception(exception.Message + ": " + startInfo.FileName);
            } 
        }
    }

    class SourceInsightLauncher
    {
        SourceInsightLauncher()
        {
        }

        public static void Launch(string doxyFileName, string line)
        {
            ProcessStartInfo startInfo = new ProcessStartInfo();
            startInfo.FileName = "C:\\Program Files\\Source Insight 3\\Insight3.exe";
            startInfo.WindowStyle = ProcessWindowStyle.Hidden;
            startInfo.Arguments = " +" + line + doxyFileName;
            try
            {
                Process.Start(startInfo);
            }
            catch (System.ComponentModel.Win32Exception exception)
            {
                throw new Win32Exception(exception.Message + ": " + startInfo.FileName);
            }
        }
    }
}
